package com.distribute.pojo.Task;

import com.distribute.pojo.enums.TaskType;

import java.util.List;

public class ShellTaskDefinition extends TaskDefinition{
    private ShellTaskParams taskParams;

    private TaskType taskType = TaskType.SHELL;

    public TaskType getTaskType() {
        return taskType;
    }

    public void setTaskType(TaskType taskType) {
        this.taskType = taskType;
    }

    static class ShellTaskParams{
        private String rawScript;

        private List<LocalParams> localParams;

        private List resourceList;

        public String getRawScript() {
            return rawScript;
        }

        public void setRawScript(String rawScript) {
            this.rawScript = rawScript;
        }

        public List<LocalParams> getLocalParams() {
            return localParams;
        }

        public void setLocalParams(List<LocalParams> localParams) {
            this.localParams = localParams;
        }

        public List getResourceList() {
            return resourceList;
        }

        public void setResourceList(List resourceList) {
            this.resourceList = resourceList;
        }
    }

    static class LocalParams{
        private String prop;

        private String direct;

        private String type;

        private String value;

        public String getProp() {
            return prop;
        }

        public void setProp(String prop) {
            this.prop = prop;
        }

        public String getDirect() {
            return direct;
        }

        public void setDirect(String direct) {
            this.direct = direct;
        }

        public String getType() {
            return type;
        }

        public void setType(String type) {
            this.type = type;
        }

        public String getValue() {
            return value;
        }

        public void setValue(String value) {
            this.value = value;
        }
    }

    public ShellTaskParams getTaskParams() {
        return taskParams;
    }

    public void setTaskParams(ShellTaskParams taskParams) {
        this.taskParams = taskParams;
    }
}
